
#ifndef _ALITTLE_PRIMARYIDMANAGER_H_
#define _ALITTLE_PRIMARYIDMANAGER_H_

#include <string>
#include <boost/thread/mutex.hpp>

namespace ALittle
{

class PrimaryIDManager
{
public:
	PrimaryIDManager();
	~PrimaryIDManager();

public:
	void Init(const std::string& db_name, const std::string& table_name);

public:
	unsigned long long CreateID();
	unsigned long long NextID();

private:
	boost::mutex m_mutex;
	unsigned long long m_id;
};

} // ALittle

#endif // _ALITTLE_PRIMARYIDMANAGER_H_